From: verdre Date: Sat, 7 Apr 2018 19:23:13 +0000 (+0200) Subject: loginDialog: Don't display timed login indicator if unused X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~929^2~5^2~92 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1dd16618d15c850d6f7652c382b915f0938c6959;p=gnome-shell.git loginDialog: Don't display timed login indicator if unused This fixes the slightly bigger padding underneath the login item compared to the padding above --- diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index 052a1d814..bf7967700 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -85,7 +85,8 @@ var UserListItem = new Lang.Class({ GObject.BindingFlags.SYNC_CREATE); this._timedLoginIndicator = new St.Bin({ style_class: 'login-dialog-timed-login-indicator', - scale_x: 0 }); + scale_x: 0, + visible: false }); layout.add(this._timedLoginIndicator); this.actor.connect('clicked', this._onClicked.bind(this)); @@ -125,6 +126,8 @@ var UserListItem = new Lang.Class({ this.hideTimedLoginIndicator(); + this._timedLoginIndicator.visible = true; + let startTime = GLib.get_monotonic_time(); this._timedLoginTimeoutId = GLib.timeout_add (GLib.PRIORITY_DEFAULT, 33, @@ -151,6 +154,8 @@ var UserListItem = new Lang.Class({ GLib.source_remove(this._timedLoginTimeoutId); this._timedLoginTimeoutId = 0; } + + this._timedLoginIndicator.visible = false; this._timedLoginIndicator.scale_x = 0.; } });